package cn.edu.seig.textbook.domain.pojo;

import cn.edu.seig.textbook.enums.RequestEnum;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

import java.io.Serial;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author day
 * @since 2024-11-07
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("tb_requests")
public class Requests implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 申请ID
     */
    @TableId(value = "request_id", type = IdType.AUTO)
    private Integer requestId;

    /**
     * 教师ID (外键)
     */
    @TableField("teacher_id")
    private Integer teacherId;

    /**
     * 申请操作（文本内容）
     */
    @TableField("request_content")
    private String requestContent;


    /**
     * 申请状态
     */
    @Setter
    @TableField("request_status")
    private RequestEnum requestStatus;

    /**
     * 教师姓名
     */
    @TableField(exist = false) // 不会映射到数据库
    private String teacherName;
}
